<#assign currentTime = .now>
package ${templateTable.packageName}.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}.application.cqrs.query.condition;

import com.neegix.application.query.EnumOperator;
import com.neegix.application.query.WhereGroups;
<#-- 过滤数据 -->
<#assign filteredTypes = []>
<#list templateTable.columns as column>
    <#assign filteredTypes = filteredTypes + [column.fullyQualifiedJavaType]>
</#list>

<#-- 去重 -->
<#assign uniqueTypes = []>
<#list filteredTypes as type>
    <#if !uniqueTypes?seq_contains(type)>
        <#assign uniqueTypes = uniqueTypes + [type]>
    </#if>
</#list>

<#-- 输出结果，排除包含 "lang" 的类型 -->
<#list uniqueTypes as type>
    <#if !type?contains("lang")>
import ${type};
    </#if>
</#list>
import java.util.List;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="${templateTable.copyright}">${templateTable.copyright}</a>.
  *
  * @author <a href="${templateTable.copyright}">${templateTable.copyright}</a>
  * @version ${templateTable.version}
  * @since ${currentTime?string("yyyy-MM-dd HH:mm:ss")}
  */

public class ${templateTable.javaTableName}WhereGroup extends WhereGroups {
    <#if templateTable.columns?exists>
        <#list templateTable.columns as column>
    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}IsNull() {
        addCriterion("${column.sqlName}", EnumOperator.IS_NULL, null);
        return this;
    }

    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}IsNotNull() {
        addCriterion("${column.sqlName}", EnumOperator.IS_NOT_NULL, null);
        return this;
    }

    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}EqualTo(${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.EQUAL, value);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotEqualTo(${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.NOT_EQUAL, value);
        return this;
    }

    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}Between(${column.javaType} value1, ${column.javaType} value2) {
        addCriterion("${column.sqlName}", EnumOperator.GREATER_EQUAL_THAN, value1);
        addCriterion("${column.sqlName}", EnumOperator.LESS_EQUAL_THAN, value2);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotBetween(${column.javaType} value1, ${column.javaType} value2) {
        addCriterion("${column.sqlName}", EnumOperator.LESS_THAN, value1);
        addCriterion("${column.sqlName}", EnumOperator.GREATER_THAN, value2);
        return this;
    }



    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}LikeTo(${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.LIKE, true, value, true);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}LikeTo(boolean prefix, ${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.LIKE, prefix, value, false);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}LikeTo(${column.javaType} value, boolean suffix) {
        addCriterion("${column.sqlName}", EnumOperator.LIKE, false, value, suffix);
        return this;
    }




    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotLikeTo(${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.NOT_LIKE, true, value, true);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotLikeTo(boolean prefix, ${column.javaType} value) {
        addCriterion("${column.sqlName}", EnumOperator.NOT_LIKE, prefix, value, false);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotLikeTo(${column.javaType} value, boolean suffix) {
        addCriterion("${column.sqlName}", EnumOperator.NOT_LIKE, false, value, suffix);
        return this;
    }



    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}In(List<${column.javaType}> list) {
        addCriterion("${column.sqlName}", EnumOperator.IN, list);
        return this;
    }


    public ${templateTable.javaTableName}WhereGroup and${column.javaName?cap_first}NotIn(List<${column.javaType}> list) {
        addCriterion("${column.sqlName}", EnumOperator.NOT_IN, list);
        return this;
    }

        </#list>
    </#if>

}
